From cb32f0a63a4ed0460af7d000829fd33ab38e96a8 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 16 Apr 2004 19:32:23 +0000 Subject: [PATCH] (try_scrolling): Make sure `scroll-conservatively' is not too large before computing how much to scroll. --- src/xdisp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xdisp.c b/src/xdisp.c index b1633132214..2cd1d548457 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10879,6 +10879,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, else this_scroll_margin = 0; + /* Force scroll_conservatively to have a reasonable value so it doesn't + cause an overflow while computing how much to scroll. */ + if (scroll_conservatively) + scroll_conservatively = min (scroll_conservatively, + MOST_POSITIVE_FIXNUM / FRAME_LINE_HEIGHT (f)); + /* Compute how much we should try to scroll maximally to bring point into view. */ if (scroll_step || scroll_conservatively || temp_scroll_step) -- 2.30.2